﻿var arr1 = ["您的情感问题是？"
    ,"Ta在你心中的重要性？","你是否愿意为TA付出和改变?","失去ta是否寝食难安，你确定真的爱ta吗？",
    "如果挽回ta需要一个月，你能坚持下去吗？","恭喜你，你的情况符合情感修复标准。你的意志坚决，只要有正确的引导和挽回方法，复合机会很大!你想尽快开始行动吗?",
    "危机期感情十分脆弱，错误的挽救方式，会摧毁所有的感情，每一秒的流逝，都在加大情感修复的难度。不想错过就马上行动吧!情感独家原创手法+专业指导=成功挽回，并用这套体系成功帮助50,000人挽回！","添加下方微信，即可获得1对1情感分析服务!想挽回心爱的TA就尽快联系我吧![复制微信后，记得要去微信进行添加，下面有添加方法]"
    ];

var arr2 = ["分手挽回","高","是","是","能","是"];

var arr3 = ["挽救婚姻","一般","否","否","不能", "否",];
var count = arr1.length;
$(".start").click(function () {
    $(".content").append(" <div class=\"guke animated fadeInUp\">\n" +
        "<div class=\"bg2\">开始</div>\n" +
        " <div class=\"imgSize2-box0\"><img src=\"images/qw.png\" class=\"imgSize2\" alt=\"\"></div></div>");
    $(".first").show();
    $(".secend").hide();
    $(".first .start").html("请稍后...");
    setTimeout(function () {
        $(".content").append("<div class=\"yisheng  animated fadeInUp\">\n" +
            " <div class=\"imgSize2-box\"><img src=\"images/2wq.png\" class=\"imgSize2\" alt=\"\"></div>" +
            " <div class=\"bg1\">您的性别是？</div>\n" +
            " </div>");
        $(".first").hide();
        $(".secend").show();
        $(".left").html("男");
        $(".right").html("女");
    },800);

});
function answerShow(answer){
    var index0 = $(".yisheng").length;
      $(".content").append(" <div class=\"guke animated fadeInUp\">\n" +
        "<div class=\"bg2\">" + answer + "</div>\n" +
        "<div class=\"imgSize2-box0\"><img src=\"images/qw.png\" class=\"imgSize2\" alt=\"\"></div></div>");
    $(".first").show();
    $(".secend").hide();
    $(".first .start").html("请稍后...");
    setTimeout(function () {
        $(".content").append("<div class=\"yisheng  animated fadeInUp\">\n" +
            " <div class=\"imgSize2-box\"><img src=\"images/2wq.png\" class=\"imgSize2\" alt=\"\"></div>" +
            " <div class=\"bg1\">" + arr1[index0]+"</div>\n" + " </div>");
        if(index0 === count - 2){
            setTimeout(function () {
                $(".bottom-box").show();
            },1000)
            $(".secend").hide();
            $(".three").show();
            $("#here").removeClass("here");
            $(".first").hide();

            $(".content").append("<div class=\"yisheng  animated fadeInUp\">\n" +
            " <div class=\"imgSize2-box\"><img src=\"images/2wq.png\" class=\"imgSize2\" alt=\"\"></div>" +
            " <div class=\"bg1\">" + arr1[index0+1]+"</div>\n" + " </div>");
        }else{
            $(".first").hide();
            $(".secend").show();
            $(".left").html(arr2[index0]);
            $(".right").html(arr3[index0]);

            
        }
    },800);

}
$(".left").click(function () {
    var answer = $(this).html();
    answerShow(answer)
});
$(".right").click(function () {
    var answer = $(this).html();
    answerShow(answer)
});

$(".copy1").on("click",function () {
	wxh = $(".text").text();
    var clipboard2 = new ClipboardJS('.copy1', {
        text: function() {
            return wxh;
window._agl && window._agl.push(['track', ['success', {t: 3}]])
        }
    });
    clipboard2.on('success', function(e) {
        alert("复制成功");
    });
    clipboard2.on('error', function(e) {

        alert('请选择“拷贝”进行复制!')
    });
})









